echo "============= 关停服务 ================"

pid1=`ps -ef | grep youZone-1.0-SNAPSHOT.jar | grep -v grep | awk '{print $2}'`

if [ -n "$pid1" ]
then
   echo "kill -15 的pid:" $pid1
   kill -15 $pid1

   sleep 10
fi

echo "再次检测PID"
pid1=`ps -ef | grep youZone-1.0-SNAPSHOT.jar | grep -v grep | awk '{print $2}'`
if [ -n "$pid1" ]
then
   echo "kill -9 的pid:" $pid1
   kill -9 $pid1
fi

echo "============= 关停服务完成 ================"